package com.wj.blog.service.impl;

import com.wj.blog.mapper.AdminMapper;
import com.wj.blog.pojo.Admin;
import com.wj.blog.service.AboutService;
import com.wj.blog.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Author:   wj
 * Date:     2020/4/9 15:20
 * Description:
 */
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    AdminMapper mapper;
    /**
     * 通过用户名查询用户
     * @param username
     * @return
     */
    @Override
    public Admin getByUsername(String username) {
        return mapper.getByUsername(username);
    }

    /**
     * 更新管理员信息
     * @param admin
     */
    @Override
    public void update(Admin admin) {
        mapper.update(admin);
    }
}
